package com.grq.mis.dao;

import com.grq.mis.entity.*;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.Sql;
import org.beetl.sql.mapper.annotation.SqlResource;
import org.beetl.sql.mapper.annotation.Update;
import org.springframework.stereotype.Repository;

/*
* 
* gen by beetlsql3 mapper 2021-11-21
*/
@SqlResource("user")
@Repository
public interface UserDao extends BaseMapper<User> {

    @Update
    @Sql(value = "update t_user set department_id = null where department_id = ?")
    void deleteDepartmentId(Long id);

    @Sql("select count(*) from t_user")
    long allUser();

    @Sql("select count(*) from t_user where DATE_FORMAT(create_time, '%Y-%m-%d') = ?")
    long todayUser(String today);
}
